semicolon

 

The semicolon is used for making helpful comments or notes on a line of code. All the characters will turn grey after a semicolon is used. Keep in mind that whenever a semicolon is used at the beginning of the line, this part of the code will not run. More than one semicolon can be used for emphasis. For example:

;; this procedure moves the fish forward
 to move-fish 
 ask fish [ fd 1 ]  
end
 

Try it Yourself

 
 
 
 
 
 
 

What's next?

Once you mastered the semicolon primitive, don't stop there. Check out the resources below to improve your NetLogo skills.

 
Similar primitives:
to

used to begin a command procedure

Read more
to-report

Begin a procedure to create a custom reporter.

Read more
end

Conclude a procedure.

Read more
ask

a reporter that is used to make the agents in the agentset do something.

Read more
 
Learn another primitive